home *** CD-ROM | disk | FTP | other *** search
/ TOS Silver 2000 / TOS Silver 2000.iso / programm / GNU_C++ / LIB / SRC / GEMLIB38.LZH / a_rsrc.c < prev    next >
Encoding:
C/C++ Source or Header  |  1998-07-10  |  1.8 KB  |  92 lines

  1. /*
  2.  * Aes resource library interface
  3.  *
  4.  * ++jrb bammi@cadence.com
  5.  * modified: mj -- ntomczak@vm.ucs.ualberta.ca
  6.  * modified: cg -- d2cg@dtek.chalmers.se
  7.  * modified: cf -- felsch@tu-harburg.de
  8.  */
  9. #include "gem.h"
  10.  
  11.  
  12. int rsrc_free(void)
  13. {
  14.    aes_control[0] = 111;
  15.    aes_control[1] = 0;
  16.    aes_control[2] = 1;
  17.    aes_control[3] = 0;
  18.    aes_control[4] = 0;
  19.    aes(&aes_params);
  20.     return aes_intout[0];
  21. }
  22.  
  23.  
  24. int rsrc_gaddr(int Type, int Index, void *Address)
  25. {
  26.     aes_intin[0] = Type;
  27.     aes_intin[1] = Index;
  28.    aes_control[0] = 112;
  29.    aes_control[1] = 2;
  30.    aes_control[2] = 1;
  31.    aes_control[3] = 0;
  32.    aes_control[4] = 1;
  33.    aes(&aes_params);
  34.     *((void **) Address) = (void *)aes_addrout[0];
  35.     return aes_intout[0];
  36. }
  37.  
  38.  
  39. int rsrc_load(char *Name)
  40. {
  41.     aes_addrin[0] = (long)Name;
  42.    aes_control[0] = 110;
  43.    aes_control[1] = 0;
  44.    aes_control[2] = 1;
  45.    aes_control[3] = 1;
  46.    aes_control[4] = 0;
  47.    aes(&aes_params);
  48.     return aes_intout[0];
  49. }
  50.  
  51.  
  52. int rsrc_obfix(void *Tree, int Index)
  53. {
  54.     aes_intin[0] = Index;
  55.     aes_addrin[0] = (long)Tree;
  56.    aes_control[0] = 114;
  57.    aes_control[1] = 1;
  58.    aes_control[2] = 1;
  59.    aes_control[3] = 1;
  60.    aes_control[4] = 0;
  61.    aes(&aes_params);
  62.     return aes_intout[0];
  63. }
  64.  
  65.  
  66. int rsrc_rcfix(void *rc_header)
  67. {
  68.     aes_addrin[0] = (long)rc_header;
  69.    aes_control[0] = 115;
  70.    aes_control[1] = 0;
  71.    aes_control[2] = 1;
  72.    aes_control[3] = 1;
  73.    aes_control[4] = 0;
  74.    aes(&aes_params);
  75.     return aes_intout[0];
  76. }
  77.  
  78.  
  79. int rsrc_saddr(int Type, int Index, void *Address)
  80. {
  81.     aes_intin[0] = Type;
  82.     aes_intin[1] = Index;
  83.     aes_addrin[0] = (long)Address;
  84.    aes_control[0] = 113;
  85.    aes_control[1] = 2;
  86.    aes_control[2] = 1;
  87.    aes_control[3] = 1;
  88.    aes_control[4] = 0;
  89.    aes(&aes_params);
  90.     return aes_intout[0];
  91. }
  92.